package com.da.javatest.webflux.service;

import com.da.javatest.webflux.entity.User;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * @author JokerDa.
 * @date 2021/1/6 14:56
 * Description:用户操作接口
 */
public interface UserService {
    // 根据ID查询用户
    Mono<User> getUserById(int id);

    // 查询所有用户
    Flux<User> getAllUser();

    // 保存用户
    Mono<Void> saveUser(Mono<User> userMono);

    // 删除用户
    Mono<Void> deleteUser(int id);
}
